-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BDD / Hybrid-BDD speed improvement for FHE-sized parameters #97
Conversation
ecb1b7b
to
0b34af7
Compare
9d2480f
to
b4d7ba8
Compare
b4d7ba8
to
3785832
Compare
65c31fc
to
a06530a
Compare
estimator/lwe_primal.py
Outdated
if d > 4096: | ||
for i, _ in enumerate(r): | ||
# chosen arbitrarily | ||
j = d - 1024 + i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this is saying: start with block size 1024 max?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the final SVP call in size eta
yes, so instead of looking for eta \in [n, n-1, ..., 2]
it would be eta \in [1024, 1023,...2]
-- I admit it's a bit unsatisfactory.
Maybe I can look at what the required eta
would be for e.g RC.ADPS16(eta, 4096) > 2**512
or something, and use this as an upper bound instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that:
sage: RC.ADPS16(1754, 1754).log(2.)
512.168000000000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will update -- good point that it should be RC.ADPS16(eta,eta)
!
For BDD
Before:
After:
The idea is that checking for the required SVP dimension from from
0
ton
isn't needed, and we can check from0
to some other value much smaller thann
(arbitrarily chosen for now).For Hybrid-BDD
Before:
After:
The idea here is that the number of secret co-efficients guessed,
zeta
, doesn't need to be checked between0
andn
and can instead be searched for in some range[0, zeta_max]
, wherezeta_max
is computed using a usvp estimate. A nice consequence of this change is that we can run hybrid attack estimates for very large values ofn
in a reasonable amount of time: